# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-keepass
pkgver=4.0.6
pkgrel=1
pkgdesc="Python3 library to interact with keepass databases"
url="https://github.com/libkeepass/pykeepass"
arch="noarch !s390x" # pykeepass test fail on s390x
license="GPL-3.0-only"
depends="
	py3-argon2-cffi
	py3-cffi
	py3-construct
	py3-dateutil
	py3-future
	py3-lxml
	py3-pycryptodomex
	python3
	"
makedepends="py3-setuptools"
subpackages="$pkgname-pyc"
source="
	https://github.com/libkeepass/pykeepass/archive/refs/tags/v$pkgver/py3-keepass-$pkgver.tar.gz
	0001-relax-dependencies.patch
	"
builddir="$srcdir/pykeepass-$pkgver"

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
43f31c1b07dd28afe13fcd58f9e34419338219a46dbaf7c018ba747f1ed1ca4b97d96559e390665bac549f54ac525ebdc075e49abbcd049dec4bd367c393da25  py3-keepass-4.0.6.tar.gz
cbada2556dd64e31143de1d7ceb879e9e6fa7c828f2c7b1499cab4513646b46aa2993d72ba40dec82d5830a5e804a5843d208af9b3b5ad0f1fa7a0e1f8b12071  0001-relax-dependencies.patch
"
